package com.itheima_03;

public class IntegerDemo {
    public static void main(String[] args) {
        // int --- String
        int number = 100;
        //方式1
        String s1 = "" + number;
        System.out.println(s1);

        //方式2
        String s2 = String.valueOf(number);
        System.out.println(s2);
        System.out.println("--------");

        //String ----- Int
        //方式1
        String s = "100";
        Integer i = Integer.valueOf(s);
        int x = i.intValue();
        System.out.println(x);

        //方式2
        int y = Integer.parseInt(s);
        System.out.println(y);
    }
}
